# syntax=docker/dockerfile:1

FROM python:3.9

# RUN mkdir /code

# 将代码和项目依赖添加到code文件夹
# ADD ./main /code

# 设置code文件夹是工作目录
WORKDIR ./

COPY requirements.txt /tmp/requirements.txt
RUN pip3 install --index-url https://pypi.tuna.tsinghua.edu.cn/simple -r /tmp/requirements.txt

COPY . .

CMD [ "python3", "-m" , "flask", "run", "--host=0.0.0.0"]
